//
//  ByCellShopCarSettleAddressEmpty.m
//  mijifen_ios
//
//  Created by 朱凯 on 2017/10/27.
//  Copyright © 2017年 itboye. All rights reserved.
//

#import "ByCellShopCarSettleAddressEmpty.h"

@implementation ByCellShopCarSettleAddressEmpty
{
    UILabel     *_noteLabel;     // 地址
    
    UIView      *_sepLine;          // 分隔
    UIImageView *_arrowView;        // 箭头

}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self setupUI];
        [self layout];
    }
    return self;
}

- (void)setupUI {
    
  
    // 地址
    _noteLabel = [UILabel new];
    _noteLabel.numberOfLines = 2;
    _noteLabel.font = FONT(14);
    _noteLabel.text = @"您还未填写收货地址，请先填写收货地址！";
    [self.contentView addSubview:_noteLabel];
    
    // 分割
    _sepLine = [[UIView alloc] init];
    _sepLine.backgroundColor = BY_LINE_COLOR;
    [self.contentView addSubview:_sepLine];
    
    // 双箭头
    _arrowView = [[UIImageView alloc] init];
    _arrowView.image = [UIImage imageNamed:@"双箭头"];
    [self.contentView addSubview:_arrowView];
}

- (void)layout {
    
    [_noteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.equalTo(@10);
        make.bottom.equalTo(@-10);
        make.right.equalTo(_sepLine.mas_left).offset(-10);
    }];
    [_arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(15, 15));
        make.right.equalTo(@-15);
        
        make.centerY.equalTo(@0);
    }];
    [_sepLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.equalTo(@20);
        make.right.equalTo(_arrowView.mas_left).offset(-15);
        make.width.equalTo(@1);
        make.centerY.equalTo(_arrowView);
    }];
}

@end
